package com.gientech.elasticsearch.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "test_user")
public class User {

    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    // 用户名
    @Field(type = FieldType.Keyword)
    private String name;

    // 密码
    @Field(type = FieldType.Keyword)
    private String password;

    // 性别
    @Field(type = FieldType.Keyword)
    private String sex;

    // 地址
    @Field(type = FieldType.Keyword)
    private String addr;

    // 电话
    @Field(type = FieldType.Keyword)
    private String tel;

    // 邮箱
    @Field(type = FieldType.Keyword)
    private String email;

    // 爱好
    @Field(type = FieldType.Keyword)
    private String[] hobby;


}
